package com.exposit.zbs.dao.impl;

import com.exposit.zbs.dao.IChangelogDAO;
import com.exposit.zbs.dao.base.BaseDAO;
import com.exposit.zbs.entity.GrantChangelogEntity;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * Created by Andrey on 22.08.2014.
 */
@Repository
public class ChangelogDAO extends BaseDAO<GrantChangelogEntity, Long> implements IChangelogDAO {

	@Override
	public List<GrantChangelogEntity> getUsersFeed(Long userId) {

		return getSession().createSQLQuery("CALL GetUserFeed(:userId)").addEntity(GrantChangelogEntity.class).setString("userId", userId.toString()).list();
	}
}
